package com.NewsDao;
import com.entity.News;
import com.entity.NewsDetail;
import com.entity.User;

import java.sql.SQLException;
import java.util.List;

public interface NewsDao {
    //查
    public List<News> selectAll();
    public News selectById(int id);
    public List<News> selectPage(int index,int crencount);

    public User getUser(String name,String password) ;


    //增
    public int insertNews(NewsDetail newsDetail);


    //删
    public int deleteById(int id);
    public int deleteByName(String name);

    //改
    public int updateById(int id);
    public int updateByByName(String name);
    public int updateNews(News news);

}
